#include <iostream>
using namespace std;

class Base{
protected:
    Base *next;
public:
    virtual void fun();
};

class A:public Base{
public:
    A(){
        next = NULL;
    }
    A(Base *t){
        next = t;
    }
};

class B:public Base{
};

class Decorator:public Base{
};

class D1 :public Decorator{
    void fun();
};

class D2 :public Decorator{
    void fun();
};

class My{
    Base *base;
};